package common;

/**
 * 枚举类
 * 同一管理系统中的响应状态码核对应的提示信息
 *
 */
public enum ResultCodeEnum {
    //定义枚举常量
    SUCCESS(200,"success"),
    USERNAME_ERROR(501,"usernameError"),
    PASSWORD_ERROR(503,"passwordError"),
    NOTLOGIN(504,"notLogin"),
    USERNAME_USED(505,"userNameUsed")
    ;

    private Integer code;
    private String message;
    //私有的有参构造器，枚举类构造方法必须私有，确保只能在类内部创建实例
    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public Integer getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }
}
